home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
MACVOGL-
/
HALLOC.C
< prev
next >
Wrap
Text File
|
1992-07-19
|
331b
|
24 lines
#include <stdio.h>
extern char *malloc();
/*
* hallocate
*
* Allocate some memory, barfing if malloc returns NULL.
*/
char *
hallocate(size)
unsigned size;
{
char *p;
if ((p = (char *)malloc(size)) == (char *)NULL) {
fprintf(stderr,"hallocate: request for %d bytes returned NULL", size);
exit(1);
}
return (p);
}